import 'package:base_plugin/base_plugin.dart';
import 'package:finance_app/src/common/app_colors.dart';
import 'package:flutter/material.dart';

class RedDotWidget extends StatelessWidget {
  final int count;

  RedDotWidget({Key key, this.count}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    if (count == 0 || count == null) return Container();
    return Container(
      decoration: BoxDecoration(color: aceRedColor, shape: BoxShape.circle),
      width: getDp(16),
      height: getDp(16),
      alignment: Alignment.center,
      child: Text(
        count > 9 ? '9+' : '$count',
        style: TextStyle(
          color: Colors.white,
          fontSize: getSp(10),
          fontWeight: FontWeight.w700,
          height: 14 / 10,
        ),
      ),
    );
  }
}
